package com.yanxibao.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class UserSearchDTO {

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime registerBegin;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime registerEnd;
    /**
     * 用户收藏数
     */
    private Integer collectionMin;

    private Integer collectionMax;

    /**
     * 用户专业
     */
    private String userSpecialized;

    /**
     * 用户浏览历史数
     */
    private Integer historyMin;

    private Integer historyMax;

    public boolean isEmpty() {
        return (registerBegin == null && registerEnd == null && collectionMin == null && collectionMax == null &&
                userSpecialized == null && historyMin == null && historyMax == null);
    }
}
